import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {path :'/', redirect: '/home'},
    { path :'/find', component: () => import('@/views/Find.vue') },
    { path :'/my', component: () => import('@/views/My.vue') },
    { path :'/friend', component: () => import('@/views/Friend.vue') },
    {path: '/home', component: ()=>import('@/views/HomeView.vue')},
    //{path: '/search', component: SearchView}
    {path: '/search/:word?', component:() => import('@/views/SearchView.vue'),name: 'searchView'},
    { path: '/:pathMatch(.*)*', component: () => import('@/views/NotFound.vue')},
  ]
})

export default router